package com.yxsa.controller;

import com.yxsa.service.StockService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class StockController {

    @Resource
    private StockService stockService;

    @GetMapping("/stock/{name}")
    public String stock(@PathVariable("name") String name){
        return stockService.find(name);
    }
}
